package com.citcc.business.bean;

import java.math.BigDecimal;
import java.util.Date;

public class CdzAmountDetail {
    /**
     * 主键ID
     */
    private String id;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 操作类型 1-充值 2-充电 3-提现 4-冻结(字典：acc_oper_type)
     */
    private String type;

    /**
     * 操作之前总金额
     */
    private BigDecimal beforeAmount;

    /**
     * 操作金额
     */
    private BigDecimal amount;

    /**
     * 操作之后总金额
     */
    private BigDecimal afterAmount;

    /**
     * 支付类型（0;支付宝 1:微信 2:xcx）（station_payType）
     */
    private String payType;

    /**
     * 支付状态 0-待支付 1-支付中 2-成功 3-失败
     */
    private String payState;

    /**
     * 支付时间
     */
    private Date payTime;

    /**
     * 交易流水号
     */
    private String tradeNo;

    /**
     * 支付信息
     */
    private String payMessage;

    /**
     * 充电站名称
     */
    private String stationName;

    /**
     * 是否失效 0-否 1-是(字典：whether)
     */
    private String invalidFlag;

    /**
     * 失效时间
     */
    private Date invalidTime;

    /**
     * 订单ID
     */
    private String orderId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 修改人
     */
    private String updateBy;

    /**
     * 删除标识 0-未删除 1-已删除
     */
    private String delFlag;

    /**
     * 备注
     */
    private String remark;

    private String userPhone;

    private String nickName;

    /**
     * 优惠金额
     */
    private BigDecimal offMoney;

    public BigDecimal getOffMoney() {
        return offMoney;
    }

    public void setOffMoney(BigDecimal offMoney) {
        this.offMoney = offMoney;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getBeforeAmount() {
        if(beforeAmount!=null){
            return beforeAmount.setScale(2,BigDecimal.ROUND_HALF_UP);
        }else{
            return beforeAmount;
        }
    }

    public void setBeforeAmount(BigDecimal beforeAmount) {
        this.beforeAmount = beforeAmount;
    }

    public BigDecimal getAmount() {
        if(amount!=null){
            return amount.setScale(2,BigDecimal.ROUND_HALF_UP);
        }else{
            return amount;
        }
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getAfterAmount() {
        if(afterAmount!=null){
            return afterAmount.setScale(2,BigDecimal.ROUND_HALF_UP);
        }else{
            return afterAmount;
        }
    }

    public void setAfterAmount(BigDecimal afterAmount) {
        this.afterAmount = afterAmount;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getPayState() {
        return payState;
    }

    public void setPayState(String payState) {
        this.payState = payState;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getPayMessage() {
        return payMessage;
    }

    public void setPayMessage(String payMessage) {
        this.payMessage = payMessage;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getInvalidFlag() {
        return invalidFlag;
    }

    public void setInvalidFlag(String invalidFlag) {
        this.invalidFlag = invalidFlag;
    }

    public Date getInvalidTime() {
        return invalidTime;
    }

    public void setInvalidTime(Date invalidTime) {
        this.invalidTime = invalidTime;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
}